-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update http dependency name #1884
Conversation
060f1a1
to
26b306b
Compare
e2b9bbd
to
f639b71
Compare
f639b71
to
53162ff
Compare
53162ff
to
ddd5f3f
Compare
class UrlParser { | ||
|
||
/** | ||
* Returns the path portion of the url. | ||
* | ||
* <p>Returns {@code null} if the path cannot be extracted from url for any reason. | ||
*/ | ||
@Nullable | ||
static String getPathFromUrl(String url) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like URL.getPath() does the same thing? it handles case like ?query and #. Can we convert url string to an URL object and then use getPath directly, and we can get rid of UrlParser?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructing URL objects is slow: open-telemetry/opentelemetry-java-instrumentation#3699
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will be nice to compare the perf side by side. was URLStreamHandler.parseURL slow or the constructor of URL?
inside the constructor it will invoke parseURL from the handler.. I am wondering if the newer version of java has improved it..
Built on top of #1890EDIT: no longer as #1890 has been merged tomain